package com.sscw.task.enums;

/**
 * @Author: sunxuzong
 * @Date: 2024/07/19
 */
public enum RankCodeEnum {
    hq("hq","豪气榜"),
    sg("sg","松果榜"),
    gs("gs","推币高手榜"),
    cw_high("cw-high","潮玩达人(高倍房)"),
    cw_low("cw-low","潮玩达人(低倍房)"),
    ticket_daily("ticket-daily", "彩票榜-日榜"),
    ticket_week("ticket-week", "彩票榜-日榜"),
    ;

    private String code;

    private String desc;

    RankCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static RankCodeEnum getByCode(Integer code){
        for (RankCodeEnum enums : RankCodeEnum.values()){
            if (enums.getCode().equals(code)){
                return enums;
            }
        }
        return  null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
